/*
 *  main.c
 *  Arizona State University
 *  CSE 325: Embedded Systems Programming
 *  Lab 7: Morse Code
 *  Georgii Tkachuk, Brentton Garber
 *  Emails: 	gtkachuk@asu.edu btgarber@asu.edu
 *  Description: This initializes the morse code application. Once it initializes the modules, the timers will track the time that has passed between
 *  			 button presses, then translate it into characters, which are then displayed to the led matrix screen
 */


#include "support_common.h" /* include peripheral declarations and more */
#if (CONSOLE_IO_SUPPORT || ENABLE_UART_SUPPORT)
/* Standard IO is only possible if Console or UART support is enabled. */
#include <stdio.h>
#endif
#include "common.h"


// Initialize our components
static void init()
{
	pwm_init();
	nunchuk_init();
	ledmatrix_init();			// Initialize the LED Matrix
	gpt_init();					// Initialize the gpt
	pit_init();					// Initialize the pit
	uc_led_init();				// Initialize the leds
	
	int_uninhibit_all();		// uninhibit all
}

// Calls init() to initialize the hardware, Starts the game, then drops into an infinite loop.
int main(void)
{
	// Initialize the components
	init();
	
	// LOOP
	while(1) { }
	
	
}
